import request from '@/utils/request'

// 分页查询所有
export function queryCardNumberFiscalPage(query) {
  return request({
    url: '/salaryBankPayBackController/queryCardNumberFiscalPage',
    method: 'get',
    params: query
  })
}

// 更新人事信息
export function updatePersonnelCardNumberFiscal(query) {
  return request({
    url: '/salaryBankPayBackController/updatePersonnelCardNumberFiscal',
    method: 'get',
    params: query
  })
}

// 撤销更新人事信息
export function undoUpdatePersonnelCardNumberFiscal(query) {
  return request({
    url: '/salaryBankPayBackController/undoUpdatePersonnelCardNumberFiscal',
    method: 'get',
    params: query
  })
}

// 生成银行数据
export function generateBankData(data) {
  return request({
    url: '/salaryBankPayBackController/generateBankData',
    method: 'post',
    data
  })
}

// 重新生成银行数据
export function regenerateBankData() {
  return request({
    url: '/salaryBankPayBackController/regenerateBankData',
    method: 'post'
  })
}

export function generateAndExportBankData() {
  return request({
    url: '/salaryBankPayBackController/generateAndExportBankData',
    responseType: 'blob',
    method: 'get'
  })
}
